//
//  PaperTestView.m
//  智云题库
//
//  Created by 毕武侠 on 2017/3/22.
//  Copyright © 2017年 bwx. All rights reserved.
//

#import "PaperTestView.h"
#import "PaperMaterialScrollView.h"
#import "PaperTestScrollView.h"
#import "PaperTestModel.h"

@interface PaperTestView ()

@property (nonatomic, strong) PaperTestModel *model;
@property (nonatomic, strong) PaperTestScrollView *answerView;

@end

@implementation PaperTestView
@dynamic answerView;

- (void)setupConfigure {
    [super setupConfigure];
    
    self.showMaterial = YES;
    self.answerView = [[PaperTestScrollView alloc] initWithFrame:CGRectMake(0, 121+SCREEN_WIDTH / 17, SCREEN_WIDTH, self.height - 121 - SCREEN_WIDTH / 17)];
    [self addSubview:self.answerView];
}

- (void)bindModel:(PaperTestModel *)model {
    _model = model;
    
    self.answerView.frame = CGRectMake(0, 121+SCREEN_WIDTH / 17, SCREEN_WIDTH, self.height - 121 - SCREEN_WIDTH / 17);
    [self setupViewFrame:YES];
    self.materialView.textLayout = model.materialLayout;
    [self.answerView bindModel:model];
}

@end
